package cn.wh.transaction;

import cn.wh.session.TransactionIsolationLevel;

import javax.sql.DataSource;
import java.sql.Connection;

/**
 * @Author: wh
 * @CreateTime: 2023-01-16  17:42
 * @Description: 事物工厂
 * @Version: 1.0
 */
public interface TransactionFactory {

    Transaction newTransaction(Connection connection);


    Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit);

}
